import Vue from 'vue'
import Router from 'vue-router'
import login from '@/components/login/login'
import home from '@/components/administrators/home'
import addAdmin from '@/components/administrators/addAdmin'
import index from '@/components/index/index'
import articlereplies from '@/components/articles/articlereplies'
import articlereply from '@/components/articles/articlereplycomment'
import articlersIndex from '@/components/articles/articlesIndex' // 1文章管理
import articlersview from '@/components/articles/view'
import CompanyOrdes from '@/components/companyOrdes/index'

import services from '@/components/services/index' // 1分类管理
import users from '@/components/users/index'
import company from '@/components/company/index'
import homeCompany from '@/components/company/home'
import homeConvention from '@/components/conventions/home'
import banner from '@/components/adblocks/banners'
import adblockIndex from '@/components/adblocks/index'
import entrepotIndex from '@/components/entrepot/index'
import statisticals from '@/components/statements/index'
import country from '@/components/adblocks/country'
import convention from '@/components/conventions/index'
import product from '@/components/products/index'
import groups from '@/components/auth/groups' // 1允许权限
import groupsn from '@/components/auth/groupsn' // 1禁止权限
import authuserIndex from '@/components/auth/userindex' // 1配置权限
import administrators from '@/components/auth/administrators'
import password from '@/components/usermsg/password'
import personaldata from '@/components/usermsg/personaldata'
import videotopiclist from '@/components/videotopic/index' // 视频主题管理
import videolist from '@/components/video/index' // 视频管理
import videototal from '@/components/video/total' // 视频管理
import videotypes from '@/components/video/types' // 视频管理
import videouser from '@/components/video/user' // 视频管理
import livesIndex from '@/components/lives/index' // 1直播管理
import category from '@/components/category/index' // 1分类管理
import mallcategory from '@/components/mallcategory/index' // 1分类管理
import systemIndex from '@/components/system/index' // 系统配置
import systemPay from '@/components/system/pay' // 系统配置
import systemDeal from '@/components/system/deal' // 系统配置
import systemSeo from '@/components/system/seo' // 系统配置
import commentsIndex from '@/components/comments/index' // 1评论管理
import commentsReply from '@/components/reply/index' // 1评论回复管理

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'login',
      component: login
    },
    {
      path: '/index',
      name: 'index',
      component: index,
      children: [
        {
          path: '/system/index',
          name: 'systemIndex',
          component: systemIndex
        },
        {
          path: '/system/deal',
          name: 'systemDeal',
          component: systemDeal
        },
        {
          path: '/system/pay',
          name: 'systemPay',
          component: systemPay
        },
        {
          path: '/system/seo',
          name: 'systemSeo',
          component: systemSeo
        },
        {
          path: '/companyOrdes/index',
          name: 'Orders',
          component: CompanyOrdes
        },
        {
          path: '/home',
          name: 'home',
          component: home
        },
        {
          path: '/addAdmin',
          name: 'addAdmin',
          component: addAdmin
        },
        {
          path: '/articlereplies/index/:id/:page',
          name: 'articlereplies',
          component: articlereplies
        },
        {
          path: '/articlereplycomments/index/:id/:page',
          name: 'articlereply',
          component: articlereply
        },
        {
          path: '/articles/index',
          name: 'articlersIndex',
          component: articlersIndex
        },
        {
          path: '/articles/view/:id',
          name: 'articlersview',
          component: articlersview
        },
        {
          path: '/services/index',
          name: 'services',
          component: services
        },
        {
          path: '/users/index',
          name: 'users',
          component: users
        },
        {
          path: '/company/index',
          name: 'company',
          component: company
        },
        {
          path: '/company/home',
          name: 'homeCompany',
          component: homeCompany
        },
        {
          path: '/conventions/home',
          name: 'homeConvention',
          component: homeConvention
        },
        {
          path: '/adblocks/banners',
          name: 'banner',
          component: banner
        },
        {
          path: '/adblocks/country',
          name: 'country',
          component: country
        },
        {
          path: '/adblocks/index',
          name: 'adblockIndex',
          component: adblockIndex
        },
        {
          path: '/entrepot/index',
          name: 'Entrepot',
          component: entrepotIndex
        },
        {
          path: '/statements/index',
          name: 'Statisticals',
          component: statisticals
        },
        {
          path: '/conventions/index',
          name: 'convention',
          component: convention
        },
        {
          path: '/products/index',
          name: 'product',
          component: product
        },
        {
          path: '/groups/index',
          name: 'groups',
          component: groups
        },
        {
          path: '/groupsn/index',
          name: 'groupsn',
          component: groupsn
        },
        {
          path: '/acos/index',
          name: 'authuserIndex',
          component: authuserIndex
        },
        {
          path: '/admins/index',
          name: 'administrators',
          component: administrators
        },
        {
          path: '/usermsg/password',
          name: 'password',
          component: password
        },
        {
          path: '/usermsg/personaldata',
          name: 'personaldata',
          component: personaldata
        },
        { // 视频管理
          path: '/video/index',
          name: 'videolist',
          component: videolist
        },
        { // 视频主题管理
          path: '/videotopic/index',
          name: 'videotopiclist',
          component: videotopiclist
        },
        { // 指定用户看视频
          path: '/video/user/:id',
          name: 'videouser',
          component: videouser
        },
        { // 合集管理
          path: '/video/total/:id',
          name: 'videototal',
          component: videototal
        },
        { // 分类管理
          path: '/video/types',
          name: 'videotypes',
          component: videotypes
        },
        { // 直播管理
          path: '/lives/index',
          name: 'livesIndex',
          component: livesIndex
        },
        { // 分类管理
          path: '/category/index',
          name: 'category',
          component: category
        },
        { // 分类管理
          path: '/mallcategory/index',
          name: 'mallcategory',
          component: mallcategory
        },
        { // 评论管理
          path: '/comments/index',
          name: 'commentsIndex',
          component: commentsIndex
        },
        { // 评论回复管理
          path: '/reply/index/:id',
          name: 'commentsReply',
          component: commentsReply
        }
      ]
    }
  ]
})
